//
//  GoShopCardTableViewController.m
//  GoodWayClient
//
//  Created by HuiDong on 15/12/8.
//  Copyright © 2015年 HuiDong. All rights reserved.
//

#import "GoShopCardTableViewController.h"
#import "GoShopCardTableViewCell.h"
#import "AllShop.h"

@interface GoShopCardTableViewController ()

@property (nonatomic, strong)NSMutableArray *array;

@end

@implementation GoShopCardTableViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    AllShop *allshop = [AllShop footView];
    
    self.tableView.tableFooterView = allshop;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

//懒加载
- (NSMutableArray *)array
{
    if (!_array) {
        _array = [NSMutableArray arrayWithArray:@[@{@"image":@"logo",@"discri":@"啦啦啦啦啦了",@"amount":@"1000",@"peopleNumber":@"1028",@"number":@"1",@"money":@"￥290.00",@"collect":@"1"},@{@"image":@"logo",@"discri":@"啦啦啦啦啦了",@"amount":@"1000",@"peopleNumber":@"1028",@"number":@"1",@"money":@"￥290.00",@"collect":@"1"},@{@"image":@"logo",@"discri":@"啦啦啦啦啦了",@"amount":@"1000",@"peopleNumber":@"1028",@"number":@"1",@"money":@"￥290.00",@"collect":@"1"},@{@"image":@"logo",@"discri":@"啦啦啦啦啦了",@"amount":@"1000",@"peopleNumber":@"1028",@"number":@"1",@"money":@"￥290.00",@"collect":@"1"}]];
    }
    return _array;
}
//数据源方法
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return self.array.count;
}


- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    GoShopCardTableViewCell *cell = [GoShopCardTableViewCell GoShopCardWithTableView:tableView];
    cell.dic = self.array[indexPath.row];
    
    return cell;
}

//设置行高
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    return 120;
}

//隐藏状态栏
- (UIStatusBarStyle)preferredStatusBarStyle
{
    return YES;
}

@end
